package cn.fu.ssh.service.impl;

import java.util.List;

import cn.fu.ssh.dao.IEmployeeDao;
import cn.fu.ssh.domain.Employee;
import cn.fu.ssh.service.IEmployeeService;

public class EmployeeServiceImpl implements IEmployeeService {

	private IEmployeeDao employeeDao;

	public void setEmployeeDao(IEmployeeDao employeeDao) {
		this.employeeDao = employeeDao;
	}

	/**使用用户名称查询用户对象*/
	public Employee findEmployeeByName(String name) {
		//使用用户名称查询用户的集合
		List<Employee> list = employeeDao.findEmployeeByName(name);
		//用户名对应惟一的对象
		Employee employee = null;
		if(list!=null && list.size()>0){
			employee = list.get(0);
		}
		return employee;
	}
	
	
}
